/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { registerEditorProvider } from '@ibiz-template/runtime';
import { App } from 'vue';
import { CheckinDateRangeEx } from './checkin-date-range-ex';
import { CheckinDateRangeExProvider } from './checkin-date-range-ex.provider';

export default {
  install(app: App) {
    // 全局注册编辑器插件组件
    app.component(CheckinDateRangeEx.name!, CheckinDateRangeEx);
    // 全局注册编辑器插件适配器，EDITOR_CUSTOMSTYLE是插件类型，checkin-date-range-ex是插件标识
    registerEditorProvider(
      'EDITOR_CUSTOMSTYLE_DATE_RANGE_EX',
      () => new CheckinDateRangeExProvider(),
    );
  },
};
